// components/bookDetail/submitFake/index.js
import { LikeModel } from '../../../models/like.js'

const likeModel = new LikeModel()

Component({
  /**
   * 组件的属性列表
   */
  properties: {
    bid: Number,
    isLike: Boolean,
    count: Number
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    handleLike (e) {
      const { behavior } = e.detail
      const { bid } = this.properties
      likeModel.like(behavior, bid, 400)
    },
    handleSubmitFake (e) {
      this.triggerEvent('on-show', {
        isShow: true
      }, {})
    }
  }
})
